package me.wangcai.trafficpoliceai.model.entity;

import com.apifan.common.random.source.*;
import com.apifan.common.random.util.ResourceUtils;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.List;
import java.util.Random;

@Data
public class DriverInfo {
    private String name;
    private String idCard;
    private String phone;
    private String address;
    @TableField("carId")
    private String carId;
    private String validityPeriod;
    private String infoId;
    private String clearDate;
    private String checkDate;
    private String updateDate;
    private String state;

    public DriverInfo(){
        name = PersonInfoSource.getInstance().randomChineseName();
        idCard = PersonInfoSource.getInstance().randomFemaleIdCard("浙江省",20);
        phone = PersonInfoSource.getInstance().randomChineseMobile();
        address = AreaSource.getInstance().randomAddress();
        StringBuilder numberBuilder = new StringBuilder(OtherSource.getInstance().randomPlateNumber());
        numberBuilder.insert(2,"-");
        carId = numberBuilder.toString();
        infoId = String.valueOf(NumberSource.getInstance().randomLong(10000000000L, 20000000001L));
        validityPeriod = DateTimeSource.getInstance().randomDate(2022, "yyyy-MM-dd");
        clearDate = DateTimeSource.getInstance().randomDate(2022, "yyyy-MM-dd");
        checkDate = DateTimeSource.getInstance().randomDate(2022, "yyyy-MM-dd");
        updateDate = DateTimeSource.getInstance().randomDate(2022, "yyyy-MM-dd");
        state = "正常";
    }
}
